package com.framework.buss.bridge.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.framework.buss.bridge.model.WordTree;
import com.framework.buss.bridge.vo.WordTreeSelectedVO;
import com.framework.common.model.SelectTreeModel;

import java.util.List;

/**
 * @Description: 模板word目录表
 * @Author: jeecg-boot
 * @Date:   2023-08-14
 * @Version: V1.0
 */
public interface IWordTreeService extends IService<WordTree> {

	/**根节点父ID的值*/
	String ROOT_PID_VALUE = "0";
	
	/**树节点有子节点状态值*/
	String HASCHILD = "1";
	
	/**树节点无子节点状态值*/
	String NOCHILD = "0";

	/**
	 * 新增节点
	 *
	 * @param wordTree
	 */
	void addWordTree(WordTree wordTree);
	
	/**
   * 修改节点
   *
   * @param wordTree
   */
	void updateWordTree(WordTree wordTree);
	
	/**
	 * 删除节点
	 *
	 * @param id
	 */
	void deleteWordTree(String id);

	  /**
	   * 查询所有数据，无分页
	   *
	   * @param queryWrapper
	   * @return List<WordTree>
	   */
    List<WordTree> queryTreeListNoPage(LambdaQueryWrapper<WordTree> queryWrapper);

	/**
	 * 【vue3专用】根据父级编码加载分类字典的数据
	 *
	 * @param parentCode
	 * @return
	 */
	List<SelectTreeModel> queryListByCode(String parentCode);

	/**
	 * 【vue3专用】根据pid查询子节点集合
	 *
	 * @param pid
	 * @return
	 */
	List<SelectTreeModel> queryListByPid(String pid);

    List<WordTreeSelectedVO> listAll(WordTreeSelectedVO treeSelectedVO);

	List<WordTree> findByIds(List<String> idList);

	WordTree findById(String originId);
}
